# coding : UTF-8

class Animal:
    '一个基本的class'
    name = ''

    def __init__(self, name):
        self.name = name;
        print("__init__")

    def eat(self):
        print("eat.." + self.name)

    def selff(self):
        print(self)
        print(self.__class__)
        print(self.__sizeof__())


if __name__ == '__main__':
    print(__name__)
    t = Animal("cat")
    t.selff()
    print(t.name)
    t.eat()
    t.name = 'dog'
    t.eat()
    getattr(t, 'name')
    setattr(t, 'name', 'ccccc')
    setattr(t, 'name', 'delete-set')
    b = hasattr(t, 'name')
    print("hasattr===" + str(b))
    t.eat()
    print(Animal.__doc__)
